package com.blue.wechat.invoke.model.media;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 获取素材列表项
 * 
 * @author zhengj
 * @since 1.0 2017年6月12日
 */
public class ListMaterialItem
{
	@JSONField(name = "media_id")
	private String mediaId;
	private ListMaterialItemNews content;
	private String name; // 文件名称
	@JSONField(name = "update_time")
	private long updateTime; // 最后更新时间
	private String url; // 资源URL
	private Date updateDateTime;

	public ListMaterialItem()
	{
	}

	public String getMediaId()
	{
		return mediaId;
	}

	public void setMediaId(String mediaId)
	{
		this.mediaId = mediaId;
	}

	public ListMaterialItemNews getContent()
	{
		return content;
	}

	public void setContent(ListMaterialItemNews content)
	{
		this.content = content;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public long getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(long updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getUpdateDateTime()
	{
		if (updateDateTime == null)
		{
			synchronized (this)
			{
				if (updateDateTime == null)
				{
					updateDateTime = new Date(updateTime * 1000);
				}
			}
		}
		return updateDateTime;
	}

	public String getUrl()
	{
		return url;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

}
